﻿<local:DocumentBase x:Class="WPFExcelReport.DSTAB05DOC"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:DSTAB05DOC"
                    Height="700" Width="1024" 
                    Title="DSTAB05DOC"  
                    >
    <local:DocumentBase.Resources>
        <db:SETVV  x:Key="SETUI" />
        <CollectionViewSource   x:Key="vwKUNDADR" Source="{Binding Path=KUNDADR,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwKDSTAMM" Source="{Binding Path=KDSTAMM,Source={StaticResource SETUI}}" />
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="200" />
            <RowDefinition Height="500" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2"  >            
            <WrapPanel Name="ZoneOrder">
                <Label Content="订单号"    Width="70" Margin="0,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center"  Foreground="#FF1D1A1A" />
                <TextBox Name="txtFKRS" Width="40" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18"  Foreground="#FF1D1A1A" CharacterCasing="Upper" MaxLength="2" />
                <TextBox Name="txtFLFD" Width="85" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Beige" FontSize="18" Height="30" Foreground="#FF1D1A1A" CharacterCasing="Upper" MaxLength="6" />
                <TextBox Name="txtFPOS" Width="40" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" FontSize="18" Height="30" Foreground="#FF1D1A1A" CharacterCasing="Upper" MaxLength="3"/>
                <Label Content="批号："    Width="48" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBlock  FontSize="18" Height="27"    Width="50" Name="txtWBTP"  Background="Pink" Margin="0,0,0,0" Text="" />
                <Button   Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetABPOS" Click="btnGetABPOS_Click"  KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button  Height="30" Margin="20,0,0,0"  Name="btnPrintPreview" Width="30" Click="btnPrintPreview_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Print.png" />
                    </Button.Background>
                </Button>
                <Button  Content="加工单查询" Height="30"  Width="80" Margin="10,0,0,0" Name="btnGetABPOS1" Click="btnGetABPOS1_Click"  KeyboardNavigation.TabIndex="5" IsDefault="True" TabIndex="13">
                    
                </Button>
                <Button  Content="加工单打印" Height="30" Margin="20,0,0,0"  Name="btnPrintPreview1" Width="83" Click="btnPrintPreview_Click">
                    
                </Button>
            </WrapPanel>
            <WrapPanel Name="ZoneFTP"
                   Visibility="Hidden">
                <CheckBox FontSize="14"
                      Content="属于管理员"
                      Name="IsBelongs2Admin"></CheckBox>
                <TextBlock FontSize="14"
                       MinWidth="200"
                       Width="Auto"
                       Name="Administration"
                       Background="#FF00AF00"></TextBlock>
                <TextBlock>FTP站点:</TextBlock>
                <TextBox Name="txtFTPSite"
                     Width="Auto"
                     TabIndex="6">192.168.1.102</TextBox>
                <TextBox Name="txtFTPPort"
                     Width="Auto"
                     TabIndex="7">21</TextBox>
                <Label Content="用户名"
                   Width="60"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <TextBox Name="txtFTPUser"
                     Width="80"
                     Margin="10,0,0,0"
                     Text="sun"
                     HorizontalAlignment="Left"
                     Background="Yellow"
                     FontSize="18"
                     MaxLength="8"
                     AcceptsTab="False"
                     CharacterCasing="Upper"
                     KeyboardNavigation.TabIndex="0"
                     TabIndex="8" />
                <Label Content="密码"
                   Width="40"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <PasswordBox Name="txtFTPPwd"
                         Width="80"
                         Margin="10,0,0,0"
                         HorizontalAlignment="Left"
                         Background="Yellow"
                         FontSize="18"
                         KeyboardNavigation.TabIndex="1"
                         TabIndex="9" />
                <Button Height="Auto"
                    Margin="10,0,0,0"
                    Name="btnLogFTP"
                    Width="34"
                    Click="btnLogFTP_Click"
                    KeyboardNavigation.TabIndex="2"
                    IsDefault="True"
                    TabIndex="10">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/User.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            </StackPanel>
        <StackPanel  Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="0,0,3,0">
            <WrapPanel>

           <fd:FilteringDataGrid
            CanUserReorderColumns="True"  
            CanUserResizeRows="True" 
            CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"  
            EnableRowVirtualization="True"  
            RowDetailsVisibilityMode="VisibleWhenSelected"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch"
            IsSynchronizedWithCurrentItem="True" 
            Opacity="10" 
            Visibility="Visible"
            ItemsSource="{Binding}" 
            Margin="0,2,0,0" 
            x:Name="dlgABPOS" Height="151" Width="1016">
                    <DataGrid.Columns>
                        <!--ABPAUFKRS,A.ABPAUFLFD,A.ABPAUFPOS,A.ABPAUFART, A.ABPART,A.ABPVAR,A.ABPFARBE, FINISHING, "
                    QTY,A.ABPNEUDAT,A.ABPENDDAT, WORKFLOW, CUSTOMER, REMARK,SO-->
                        <DataGridTextColumn Binding="{Binding Path=ABPAUFKRS}" Header="前缀" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=ABPAUFLFD}" Header="单号" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=ABPAUFPOS}" Header="单行" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABPAUFART}" Header="类型"  Width="SizeToCells" MinWidth="30"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="品种编号" Width="SizeToCells" MinWidth="60"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPVAR}" Header="版本" Width="SizeToCells"  MinWidth="30"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="色号" Width="SizeToCells" MinWidth="30"/>
                        <DataGridTextColumn Binding="{Binding Path=FINISHING}" Header="后整理" Width="SizeToCells" MinWidth="60"/>
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="订单量" Width="SizeToCells" MinWidth="50"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPNEUDAT}" Header="开单日期" Width="SizeToCells" FontSize="12"  MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=ABPENDDAT}" Header="计划交期" Width="SizeToCells"  FontSize="12" MinWidth="60"/>
                        <DataGridTextColumn Binding="{Binding Path=WORKFLOW}" Header="加工流程"  Width="SizeToCells" FontSize="12" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=CUSTOMER}" Header="客户编号"  Width="SizeToCells" FontSize="12" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=SO}" Header="销售单号"   FontSize="12" Width="SizeToCells" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=COUNT}" Header="纱支" Width="SizeToCells" MinWidth="30"/>
                        <DataGridTextColumn Binding="{Binding Path=REMARK}" Header="生产单备注"   FontSize="12" MinWidth="100"/>
                    </DataGrid.Columns>
                </fd:FilteringDataGrid  >

            </WrapPanel>
            <WrapPanel Height="515">
                <fd:FilteringDataGrid
            CanUserReorderColumns="True"  
            CanUserResizeRows="True" 
            CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"  
            EnableRowVirtualization="True"  
            RowDetailsVisibilityMode="VisibleWhenSelected"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch"
            IsSynchronizedWithCurrentItem="True" 
            Opacity="10" 
            Visibility="Visible"
            SelectionChanged="MainDataGrid_SelectionChanged"
            ItemsSource="{Binding}" 
            Margin="0,2,0,0" 
            x:Name="dlgWBTP" Height="507" Width="356">
                    <DataGrid.Columns>
                        <!--WBBAUFKRS,WBBAUFLFD,WBBAUFPOS,WBBTP, PENUM, QTY-->
                        <DataGridTextColumn Binding="{Binding Path=WBBAUFKRS}" Header="前缀" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=WBBAUFLFD}" Header="单号" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=WBBAUFPOS}" Header="单行" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=WBBTP}" Header="批次"   FontSize="12" Width="SizeToCells" MinWidth="30"/>
                        <DataGridTextColumn Binding="{Binding Path=STARTDAT}" Header="发坯日期" Width="SizeToCells" FontSize="12"  MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=PENUM}" Header="布卷数"   FontSize="12" Width="SizeToCells" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"   FontSize="12" Width="SizeToCells" MinWidth="40"/>
                    </DataGrid.Columns>
                </fd:FilteringDataGrid  >
                <fd:FilteringDataGrid
            CanUserReorderColumns="True"  
            CanUserResizeRows="True" 
            CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"  
            EnableRowVirtualization="True"  
            RowDetailsVisibilityMode="VisibleWhenSelected"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch"
            IsSynchronizedWithCurrentItem="True" 
            Opacity="10" 
            Visibility="Visible"
            ItemsSource="{Binding}" 
            Margin="0,2,0,0" 
            x:Name="dlgABFOLGE" Height="510" Width="395">
                    <DataGrid.Columns>
                        <!--ABFAFOLGE,A.ABFAGANG,A.ABFBZAGANG-->
                        <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE}" Header="序号" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAGANG}" Header="工步" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG}" Header="描述" Width="SizeToCells" MinWidth="100" />
                    </DataGrid.Columns>
                </fd:FilteringDataGrid  >

            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>